//
//  ZWSelectCell.m
//  wan
//
//  Created by apple on 16/3/3.
//  Copyright © 2016年 MyCompany. All rights reserved.
//

#import "ZWSelectCell.h"

@implementation ZWSelectCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self create];
    }
    return self;
}

- (void)create
{
    if (_checkedImageView == nil) {
        _checkedImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"未选中"]];
        _checkedImageView.frame = CGRectMake(13, 23, 14, 14);
        [self addSubview:_checkedImageView];
    }
}

- (void)setChecked:(BOOL)checked
{
    if (checked) {
        _checkedImageView.image = [UIImage imageNamed:@"选中"];
    } else {
        _checkedImageView.image = [UIImage imageNamed:@"未选中"];
    }
    _checked = checked;
}

//- (void)awakeFromNib {
//    // Initialization code
//}
//
//- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
//    [super setSelected:selected animated:animated];
//
//}

@end
